package com.apiit.webserviceclient.activities;

import com.apiit.webserviceclient.R;
import com.apiit.webserviceclient.R.layout;
import com.apiit.webserviceclient.R.menu;
import com.apiit.webserviceclient.utility.BPEL_Process;
import com.apiit.webserviceclient.utility.BPEL_Request;
import com.apiit.webserviceclient.utility.BPEL_Response;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class DisplayReservations extends Activity implements OnClickListener {
	
	Button back;
	TextView test;
	

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_display_reservations);
		back = (Button) findViewById(R.id.btnDisResBack);
		back.setOnClickListener(this);
		
		test = (TextView) findViewById(R.id.txtTest);
		
		Intent intename = getIntent();
		String value = intename.getStringExtra("message");
		test.setText(value);
		
//		BPEL_Process bpelProcess = new BPEL_Process();
//		BPEL_Request request = new BPEL_Request();
//		BPEL_Response respones = null;
//		try {
//			respones = bpelProcess.doRequest(request);
//		} catch (InterruptedException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
//		
//		String Result =  respones.getResultsMap().get("message");
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.display_reservations, menu);
		return true;
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		if(v==back){
			
			Intent i = new Intent(this,LibraryReservations.class);
			startActivity(i);
		}
	}

}
